Visible light communication is an emerging short-range high-speed wireless light communications technology that is developed on a basis of LED technology. A basic principle of visible light communication is that communication is performed by flashing an LED light source at a high frequency based on a characteristic that a switching speed of a light emitting diode (LED) is higher than that of a fluorescent lamp and an incandescent lamp. Presence of light represents binary 1, and absence of light represents binary 0. Information may be obtained after a high-speed light signal that includes digital information undergoes photoelectric conversion. In the wireless light communications technology, data is unlikely to be interfered with or captured, and an optical communication device can be easily made and is unlikely to be damaged or degaussed. Therefore, the wireless light communications technology can be used to make a wireless optical encryption key. Compared with microwave technologies, the wireless light communication has abundant spectrum resources, which is incomparable with general microwave communication and wireless communication. In addition, the visible light communication is applicable to any communications protocol, and applicable to any environment. In terms of security, in contrast to conventional magnetic materials, there is no need to worry about a problem of degaussing or even to worry about unlawful interception of communication content; and a wireless optical communication device features flexible and convenient installation and layout, and a low cost, and is applicable to large-scale popularity and application.
With fast promotion of visible light communication, a technology for using an LED (light emitting diode) of an electronic device to transmit a visible light signal is proposed. In the electronic device, a signal duty cycle in turn-on or turn-off of the LED is uncertain, but a duration in which the LED is on and a duration in which the LED is off may be controlled, where on and off may respectively indicate a high level and a low level. Therefore, a specially set coding mode may be used so that the LED transmits a visible light signal representing data information. However, during practice, the inventors of the present application find that a transmission rate (namely, an amount of information transmitted within a unit time) in a conventional method is still low, and that there is still room for improvement.